import 'package:flutter/cupertino.dart';

class CommStyle {
  CommStyle._();

  static Widget shaderMaskView(
    Widget child, {
    List<Color>? colors,
    List<double>? stops,
  }) {
    return ShaderMask(
      shaderCallback: (bounds) {
        return LinearGradient(
          begin: Alignment.centerLeft,
          end: Alignment.centerRight,
          colors:
              colors ??
              [Color(0xffd90f52), Color(0xfff99917), Color(0xffd90f52)],
          stops: stops,
        ).createShader(bounds);
      },
      blendMode: BlendMode.srcIn,
      child: child,
    );
  }
}
